package com.wxz.sanguo.draw;

import com.wxz.sanguo.game.war.WarCommandType;

public class WarConsle {

	private WarCommandType currentCommandType = WarCommandType.MOVE;

	public WarCommandType nextCommand() {
		int i = this.currentCommandType.getValue();

		if (i <= 3) {
			i++;
		} else {
			i = 1;
		}

		this.currentCommandType = WarCommandType.valueOf(i);
		return this.currentCommandType;
	}

	public WarCommandType beforeCommand() {
		int i = this.currentCommandType.getValue();

		if (i >= 2) {
			i--;
		} else {
			i = 4;
		}
		this.currentCommandType = WarCommandType.valueOf(i);
		return this.currentCommandType;
	}

	public void refresh() {
	
		this.currentCommandType = WarCommandType.MOVE;
	}


	
	public WarCommandType getCurrentCommandType() {
		return currentCommandType;
	}

}
